<html>
<head>
<style>
@page {
  size: 200px 200px;
  margin: 0px;
}
body, html {
  margin: 0;
  max-width: 200px;
}
</style>
</head>
<body style="padding: 20px;">
  <div style="border: 2px solid red; transform: rotate(45deg);">
    <div style="float: left;background-color: blue;width: 50%;height: 20px;"></div>
  </div>
</body>
</html>
